package com.parking.order.model.form;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.parking.common.core.paracheck.GOODOKBAD;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past;
import java.time.LocalDateTime;

/**
 * 平台查询评论Form
 * */
@Data
@ApiModel("平台查询有回复评论Form")
public class OrderCommentPlatformForm {
    /**
     * 是否回复 0无回复 1有回复
     * */
    @ApiModelProperty("是否回复")
    @NotNull(message = "isReply不能为空")
    @Min(message = "isReply不存在",value = 0)
    @Max(message = "isReply不存在", value = 1)
    private Integer isReply;
    /**
     * 页数
     * */
    @ApiModelProperty("页数")
    @NotNull(message = "pageNum不为空")
    @Min(message = "pageNum为正数",value = 1)
    private Integer pageNum;
    /**
     * 每页大小
     * */
    @ApiModelProperty("每页大小")
    @NotNull(message = "pageSize不为空")
    @Min(message = "pageSize为正数",value = 1)
    private Integer pageSize;
    /**
     * 订单编号
     * */
    @ApiModelProperty("订单编号")
    @Length(message = "orderInfoNum长度19",max = 19,min = 19)
    private String orderInfoNum;
    /**
     * 用户信息Id
     * */
    @ApiModelProperty("用户信息Id")
    @Min(message = "userInfoId为正数",value = 1)
    private Integer userInfoId;
    /**
     * 开始时间
     * */
    @ApiModelProperty("开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;
    /**
     * 结束时间
     * */
    @ApiModelProperty("结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;
    /**
     * 订单评分 Good Bad OK
     * */
    @ApiModelProperty("订单评分")
    @GOODOKBAD(message = "commentScore只能为Good Bad OK")
    private String commentScore;
    /**
     * 物业信息Id
     * */
    @ApiModelProperty("物业信息Id")
    @Min(message = "certifiedInfoId为正数",value = 1)
    private Integer certifiedInfoId;
}
